import os
import sys

env=DefaultEnvironment().Clone()
BIN_DIR=os.environ['BIN_DIR'];

env.Program(os.path.join(BIN_DIR, 'demo1'), Glob('demo1/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo2'), Glob('demo2/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo3'), Glob('demo3/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo4'), Glob('demo4/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo5'), Glob('demo5/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo6'), Glob('demo6/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo7'), Glob('demo7/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo8'), Glob('demo8/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo9'), Glob('demo9/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo10'), Glob('demo10/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo11'), Glob('demo11/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo12'), Glob('demo12/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo13'), Glob('demo13/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo14'), Glob('demo14/*.c') + ["assets.c"])

env.Program(os.path.join(BIN_DIR, 'demo15'), Glob('demo15/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo16'), Glob('demo16/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo17'), Glob('demo17/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo19'), Glob('demo19/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo20'), Glob('demo20/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo21'), Glob('demo21/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo22'), Glob('demo22/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo23'), Glob('demo23/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo24'), Glob('demo24/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo25'), Glob('demo25/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo26'), Glob('demo26/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo27'), Glob('demo27/*.c') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'demo28'), Glob('demo28/*.c') + ["assets.c"])

if 'WITH_JS' in os.environ:
  env.Program(os.path.join(BIN_DIR, 'jsdemo1'), Glob('jsdemo1/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo2'), Glob('jsdemo2/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo3'), Glob('jsdemo3/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo4'), Glob('jsdemo4/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo5'), Glob('jsdemo5/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo6'), Glob('jsdemo6/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo7'), Glob('jsdemo7/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo8'), Glob('jsdemo8/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo9'), Glob('jsdemo9/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo10'), Glob('jsdemo10/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo11'), Glob('jsdemo11/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo12'), Glob('jsdemo12/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo13'), Glob('jsdemo13/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo14'), Glob('jsdemo14/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo15'), Glob('jsdemo15/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo16'), Glob('jsdemo16/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo17'), Glob('jsdemo17/*.c') + ["assets.c"])
  env.Program(os.path.join(BIN_DIR, 'jsdemo18'), Glob('jsdemo18/*.c') + ["assets.c"])

env.Program(os.path.join(BIN_DIR, 'cppdemo1'), Glob('cppdemo1/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo2'), Glob('cppdemo2/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo3'), Glob('cppdemo3/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo4'), Glob('cppdemo4/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo5'), Glob('cppdemo5/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo6'), Glob('cppdemo6/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo7'), Glob('cppdemo7/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo8'), Glob('cppdemo8/*.cpp') + ["assets.c"])

env.Program(os.path.join(BIN_DIR, 'cppdemo9'), Glob('cppdemo9/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo10'), Glob('cppdemo10/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo11'), Glob('cppdemo11/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo12'), Glob('cppdemo12/*.cpp') + ["assets.c"])
env.Program(os.path.join(BIN_DIR, 'cppdemo13'), Glob('cppdemo13/*.cpp') + ["assets.c"])

